#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
#include "BridgetWindow.h"
#include "StatusWindow.h"
#include "CalcWindow.h"
//#include "AddProductWindow.h"
#include "GoalWindow.h"
#include"Journal.h"
#include "CalcActivity.h"

#include "LoginWidget.h"

#include <QStackedLayout>
#include <QScrollArea>
class MainWindow : public QMainWindow
{
    Q_OBJECT

private:
    bool update;
    QWidget* centralWidget;
    //QMenuBar pmnuBar;
    QMenu*   pmnu;
    QStackedLayout* stackedLayout;
    StatusWindow* status;
    BridgetWindow* wind;
    CalcWindow* calc;
  //  AddProductWindow addProd;
    GoalWindow* goal;
    CalcActivity* act;
    Journal *journal;
    LoginWidget *login;

    QPushButton savePersonalData;
    QPushButton saveGoalButton;
    QPushButton backButton;
    QScrollArea *ss;
    QScrollArea *sw;
    QScrollArea *sc;

    QString token;


public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow() {};


public slots:
    void onPersonalArea();
    void onCalorieCalculator();
    //void onEditBase();
    void back();
    void onSetButtonClicked();
    void onGoals();
    void onSaveGoalButton();
    void onJournal();
    void onActivityCalculator();

    void logIn(QString auth_token);
    void logout();
    void updateWeight(QDate date, double weight);

signals:
    void changeWeight(double weight1);


  /*  void onStatistic();
    void onDietBalls();
*/
};

#endif // MAINWINDOW_H
